]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Listen to notify::allocation instead of allocation-changed
authorJonas Dreßler <verdre@v0yd.nl>
Sat, 9 May 2020 19:37:18 +0000 (21:37 +0200)
committerJonas Dreßler <verdre@v0yd.nl>
Wed, 20 May 2020 13:12:36 +0000 (15:12 +0200)
ClutterActors "allocation-changed" signal was removed since it's no
longer needed now that there are no ClutterAllocationFlags anymore.

See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1245

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1245

js/ui/barLevel.js
js/ui/layout.js
js/ui/lookingGlass.js

index a2888aaf2661ad46482203589b5ade805c5e9f1c..f4fdb6e51a31a8e4624038bc96aeeb2e0a56ba90 100644 (file)
@@ -30,8 +30,8 @@ var BarLevel = GObject.registerClass({
             accessible_role: Atk.Role.LEVEL_BAR,
         };
         super._init(Object.assign(defaultParams, params));
-        this.connect('allocation-changed', (actor, box) => {
-            this._barLevelWidth = box.get_width();
+        this.connect('notify::allocation', () => {
+            this._barLevelWidth = this.allocation.get_width();
         });
 
         this._customAccessible = St.GenericAccessible.new_for_actor(this);
index 53a55c7705a40f487117f91122dc15aa25dc66a1..9013aa97bd37188355f280d4136f200aa335cd65 100644 (file)
@@ -246,7 +246,7 @@ var LayoutManager = GObject.registerClass({
                                            vertical: true });
         this.addChrome(this.panelBox, { affectsStruts: true,
                                         trackFullscreen: true });
-        this.panelBox.connect('allocation-changed',
+        this.panelBox.connect('notify::allocation',
                               this._panelBoxChanged.bind(this));
 
         this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup',
index ac6d41dd5aed8b01ea0748c31be1ba3080d6f23e..a5d762987c987f397d68ecbd75db5d8cfc162e27 100644 (file)
@@ -833,9 +833,9 @@ class LookingGlass extends St.BoxLayout {
         Main.uiGroup.add_actor(this);
         Main.uiGroup.set_child_below_sibling(this,
                                              Main.layoutManager.panelBox);
-        Main.layoutManager.panelBox.connect('allocation-changed',
+        Main.layoutManager.panelBox.connect('notify::allocation',
                                             this._queueResize.bind(this));
-        Main.layoutManager.keyboardBox.connect('allocation-changed',
+        Main.layoutManager.keyboardBox.connect('notify::allocation',
                                                this._queueResize.bind(this));
 
         this._objInspector = new ObjInspector(this);